<template>
	<a-select :placeholder="placeholder" :options="productList" show-search allow-clear />
</template>

<script setup>
	import { ref, onMounted } from 'vue'
	import productApi from '@/api/tjzy/product/productApi'

	const props = defineProps({
		modelValue: [String],
		placeholder: {
			type: String,
			default: '请选择所属产品'
		}
	})
	const productList = ref([])

	onMounted(() => {
		productApi.listAllProduct('', false).then((res) => {
			productList.value = res
		})
	})
</script>
